/*
 * StaticPractice.cpp
 *
 *  Created on: Mar 6, 2013
 *      Author: loadar
 */

#include "StaticLogClass.h"
#include "StaticPractice.h"
#include "StaticLogFactory.h"
#include <iostream>
#include <string>

namespace staticmember
{

StaticPractice::StaticPractice()
{

}

StaticPractice::~StaticPractice()
{

}

int StaticPractice::execute(int argc, char* argv[])
{
	std::cout << "[Static Practice]" << std::endl;
	StaticLogFactory factory;
	IStaticLog *log = factory.newStaticLogInstance();
	if (log != NULL)
	{
		log->printLog("cxq");
		delete log;
		log = NULL;
	}

	std::cout << "[Static Practice]" << std::endl;

	StaticLogClass* logClass = StaticLogClass::getStaticLogClass("StaticLog01");
	if (logClass != NULL)
	{
		log = logClass->newStaticLogInstance();
	}
	if (log != NULL)
	{
		log->printLog("ccxx");
		delete log;
		log = NULL;
	}

	return 0;
}

} /* namespace staticmember */
